Performance engineering is a critical step in the development cycle to ensure that efficient binaries are generated from software sources written in high level programming languages. The focus of performance engineering could be runtime performance and code size. There is an ever-increasing gap between software source codes and their binaries.
Software developers improve productivity by adopting software engineering techniques that emphasize modularity, code reuse, and maintainability. Unfortunately, these software engineering practices often contradict with performance engineering, in which engineers push hard to take full advantage of the hardware. It is often the case that there is no straightforward mapping from the software semantics to the low level hardware features. Compiler optimization takes over the burden of transforming the applications written in high-level programming language to binaries. Although a high percentage of compiler usage is just for automatic binary generation, many other cases depend on the compiler to generate efficient code that can take full advantage of the underlying hardware. For example, the importance of compiler optimizations is especially pronounced in digital signal processing (DSP) fields because customized processors are often introduced just to speed-up a set of applications that share the same characteristics. In these scenarios, fully utilizing the underlying hardware is important to increase the hardware's overall competitiveness.
Due to the continuous effort from the academia and the industry, the past five decades have witnessed the creation of a great number of optimization techniques. More and more powerful analysis and optimization techniques are integrated into modern compilers. Although modern compilers are versatile and powerful, they frequently let engineers down by generating sub-optimal or bad binaries. The reasons that contribute to a low quality optimization can be categorized into two categories: hard failure and soft failure. Hard failure means that the compiler misses certain features (analysis or transformation) to handle certain scenarios. This requires extra work to improve the compiler. Soft failure means the scenarios in which a compiler doesn't perform as expected but it can be worked around by using compiler options or small tweakings of the compiler. Experiences have shown that soft failures contribute a significant percentage of performance failures.